$(function () {
    window.onload = function () {
        $('.huoMa').click(function () {
            alert('验证码为   1111');
        })
        $('.zhuCe').click(function () {
            var shuJu = {
                phone: $('.tel').val(),
                code: $('.tuMa').val(),
                username: $('.use').val(),
                password: $('.psw1').val()
            };
            // console.log(shuJu);
            $.ajax({
                url: 'http://localhost:3000/users/register',
                type: 'post',
                data: shuJu,
                success: function (data) {
                    console.log(data);
                }
            })
            if ($('.yanZheng').val() != 1111) {
                alert('四位数字验证码不正确！')
            }
            if ($('.psw1').val() != $('.psw2').val()) {
                alert('两次密码不一致！')
            }
        })
    }
})